# 字典 存储元素是一个个的：键值对
# 变量名={key:value,key:value,……}

# 字典中的key不能重复

dick1 = {"rxy": 99, "xxx": 80, "www": 60}
print(dick1)
print(type(dick1))

Nonedick = {}
print(type(Nonedick))

# 字典也不可以使用下标索引，但可以通过key只想value值
score =dick1["rxy"]
print(score)

# 字典的嵌套，key不能为字典类型，value无限制
wang={"语文":77,"数学":66,"英语":33}
zhou={"语文":88,"数学":86,"英语":55}
ling={"语文":99,"数学":96,"英语":66}
stu_score_dick={"wang":wang,"zhou":zhou,"ling":ling}
print(stu_score_dick)

# 从嵌套字典中获取数据
ret1=stu_score_dick["wang"]
print(ret1)
ret2=stu_score_dick["zhou"]["数学"]
print(ret2)